﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MiniFox.Exceptions
{
    /// <summary>
    /// 无效的参数
    /// </summary>
    public class InvalidParameterException : Exception
    {
        /// <summary>
        /// 
        /// </summary>
        string _param;

        /// <summary>
        /// 
        /// </summary>
        /// <param name="parameterName"></param>
        /// <param name="message"></param>
        public InvalidParameterException(string parameterName, string message) : base(message)
        {
            _param = parameterName;
        }
        /// <summary>
        /// 
        /// </summary>
        public string ParameterName { get { return _param; } }

        /// <summary>
        /// 
        /// </summary>
        public override string Message
        {
            get
            {
                return "参数：" + this.ParameterName + "---" + base.Message;
            }
        }
    }
}
